package com.mtzqc.common.rv.adapter

import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter.base.BaseQuickAdapter
import com.mtzqc.common.rv.holder.XViewHolder

abstract class RootQuickAdapter<V, T, VH : XViewHolder> : BaseQuickAdapter<T, VH>() {

    abstract fun createXViewHolder(v: V): VH

    override fun onCreateViewHolder(context: Context, parent: ViewGroup, viewType: Int): VH {
        return createXViewHolder(createBaseViewHolder(context, parent, viewType))
    }

    abstract fun createBaseViewHolder(context: Context, parent: ViewGroup, viewType: Int): V
}